﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using SMG.Application.DTO.Migration;

namespace ManageForm.Model
{
    public class PlayViewModel
    {
        public PlayViewModel() { 
            
        }
        public PlayViewModel(PlayRecordDto dto)
        {
            this.PlayName = dto.PlayName;
            this.PlayContent = dto.PlayContent;
            this.ChannelId = dto.ChannelId;
            this.PlayDate = dto.PlayDate;
            this.PlayVersion = dto.PlayVersion;
            this.MoveStatus = dto.MoveStatus == 0 ? "未迁移" : (dto.MoveStatus == 1 ? "一级迁移完成" : "二级迁移完成");
            this.TaskStatus = dto.TaskStatus == 0 ? "未生成任务" : (dto.TaskStatus == 1 ? "一级迁移任务生成" : "二级迁移任务生成");
            this.SendXmlFlag = dto.SendXmlFlag == 0 ? "未发送" : (dto.SendXmlFlag == 1 ? "已发送" : "异常");
        }

        /// <summary>
        /// 序号
        /// </summary>
        public Int32 Index { get; set; }

        /// <summary>
        /// 图文节目名称
        /// </summary>
        public String PlayName { get; set; }
        /// <summary>
        /// 图文节目内容
        /// </summary>
        public String PlayContent { get; set; }
        /// <summary>
        /// 频道ID
        /// </summary>
        public String ChannelId { get; set; }
        /// <summary>
        /// 渠道名称
        /// </summary>
        public String ChannelName { get; set; }
        /// <summary>
        /// 播出日期
        /// 格式yyyy-MM-dd
        /// </summary>
        public String PlayDate { get; set; }
        /// <summary>
        /// 节目单版本
        /// 表示节目单版本号，从1开始递增
        /// </summary>
        public String PlayVersion { get; set; }
        /// <summary>
        /// 迁移状态
        /// 0 = 未迁移，1 = 一级迁移完成，2 = 二级迁移完成
        /// </summary>
        public String MoveStatus { get; set; }
        /// <summary>
        /// 生成任务状态
        /// 0 = 未生成迁移任务，1 = 已生成一级迁移任务，2 = 已生成二级迁移任务
        /// </summary>
        public String TaskStatus { get; set; }
        /// <summary>
        /// CG发送状态
        /// 0 未发送，1 已发送
        /// </summary>
        public String SendXmlFlag { get; set; }
        /// <summary>
        /// 锁定时间
        /// </summary>
        //public DateTime LockTime { get; set; }
        /// <summary>
        /// 节目类型
        /// 0: 图文单 1: 模板 2:模板组 3: 素材
        /// </summary>
        public String PlayType { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
    }
}
